package com.ynet.hmds28.service.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/** 
 * 
 * 注册拦截器 
 */  
@Configuration
public class WebAppConfig extends WebMvcConfigurerAdapter { 
	
    @Override  
    public void addInterceptors(InterceptorRegistry registry) {  
        //注册自定义拦截器，添加拦截路径和排除拦截路径  
        registry.addInterceptor(new InterceptorConfig()).addPathPatterns("/api/**").excludePathPatterns("/api/user/openPlatformLogin").excludePathPatterns("/api/user/registe").excludePathPatterns("/api/merchant/query").excludePathPatterns("/api/query").excludePathPatterns("/api/user/openPlatformRegister").excludePathPatterns("/api/merchant/deploy"); 
    }  
}